import java.util.Scanner;

/**
 * 放苹果
 */
public class HJ61 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int m = scanner.nextInt();
            int n = scanner.nextInt();

            System.out.println(apple(m,n));
        }
    }

    private static int apple(int m, int n) {
        if(m<0 || n<0){
            return 0;
        }
        if(m==1 || n==1 || m==0){
            return 1;
        }

        return apple(m-n,n)+apple(m,n-1);
    }
}
